package com.project.demo.dao;

import com.project.demo.dao.base.BaseMapper;
import com.project.demo.entity.HomestayInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * 民宿信息：(HomestayInformation)Mapper接口
 *
 */
@Mapper
public interface HomestayInformationMapper extends BaseMapper<HomestayInformation>{
        void updateDailyPriceToDouble();
        @Update("UPDATE `homestay_information` SET `daily_price_of_homestay` = `daily_price_of_homestay` / 2")
        int rollbackDailyPrice();

        @Update("UPDATE `homestay_information` SET `daily_price_of_homestay` = `daily_price_of_homestay` * 0.7")
        int discountDailyPrice();

        @Update("UPDATE `homestay_information` SET `daily_price_of_homestay` = `daily_price_of_homestay` / 0.7")
        int restoreDailyPrice();
}
